package com.tbit.uqbike.service.business;

import com.alibaba.fastjson.JSONObject;
import com.tbit.uqbike.object.pojo.Recharge;
import com.tbit.uqbike.object.pojo.User;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: chen
 * @Description: 充值记录
 * @Date: 创建于 15:59 2020/7/2
 */
public interface RechargeService {

    /**
     * 分页详细
     *
     * @param accountId 品牌id
     * @param orderNO
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @return
     */
    List<Recharge> queryPage(Integer accountId, String orderNO, Integer rechargeType, Long startTime, Long endTime, String phone, Integer adAccountId, Integer pageNO, Integer rowCount);


    Integer queryCount(Integer accountId, String orderNO, Integer rechargeType, Long startTime, Long endTime, String phone, Integer adAccountId);

    /**
     * 导出
     *
     * @param accountId
     * @param orderNO
     * @param startTime
     * @param endTime
     * @param adAccountId
     * @return
     */
    List<Recharge> export(Integer accountId, String orderNO, Integer rechargeType, String phone, Integer areaId, Long startTime, Long endTime, Integer adAccountId);

    /**
     * 查询某个用户某个时间段内的订单数据
     *
     * @param time
     * @return
     */
    List<Recharge> getByTime(Integer userId, String time);

    /**
     * @param accountId
     * @param rechargeType
     * @param startTime
     * @param endTime
     * @return com.alibaba.fastjson.JSONObject
     * @Description: 统计充值总额和总数
     * @createDate 2020/10/23 14:20
     */
    JSONObject getRechargeTotal(Integer accountId, Integer rechargeType, Long startTime, Long endTime);

    List<User> getBalanceByArea(HashMap<String, Object> params, Integer accountId, Long startTime, Long endTime, Integer rowCount, Integer pageNO, Boolean isPage);

    Map<String, Object> getBalanceCountByArea(Integer accountId);

    Recharge getRechargeByOrderNO(String orderNO);
}
